d/libgtk-4-0.postinst.in: Run gio-querymodules for IM modules
authorSimon McVittie <smcv@debian.org>
Fri, 14 Sep 2018 09:06:28 +0000 (10:06 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 14 Sep 2018 09:06:28 +0000 (10:06 +0100)
debian/changelog
debian/libgtk-4-0.postinst.in

index 09052ee4c59aa0db5823b157abf79739e792b3de..7c4f89af30299dd036a23a8525f5101dd4ecdf8f 100644 (file)
@@ -34,6 +34,7 @@ gtk+4.0 (3.94.0-1) UNRELEASED; urgency=medium
   * Stop installing gtk4-query-immodules, superseded by gio-querymodules
   * Drop support for OLD_MODULES_BASE_PATH. GTK+ 4 only supports modules
     in the multiarch location.
+  * d/libgtk-4-0.postinst.in: Run gio-querymodules for IM modules
 
  -- Jeremy Bicha <jbicha@debian.org>  Fri, 19 Jan 2018 22:05:35 -0500
 
index fd8b9425779ada005aa82ddb0a85685dd812ecaa..0121b6711f16c94a46a8f2dedc8778563596af69 100644 (file)
@@ -1,19 +1,22 @@
 #!/bin/sh
 set -e
 
-IMMODULES_DIR=/@MODULES_BASE_PATH@/immodules
+update_modules () {
+    for dir in immodules; do
+        if [ -d "/@MODULES_BASE_PATH@/$dir" ]; then
+            /@LIBDIR@/glib-2.0/gio-querymodules "/@MODULES_BASE_PATH@/$dir" || true
+        fi
+    done
+}
 
 if [ "$1" = triggered ]; then
     # This is triggered everytime an application installs a
-    # GTK immodule loader
-    /@LIBDIR@/@SHARED_PKG@/gtk4-query-immodules --update-cache || true
+    # GTK IM module
+    update_modules
     exit 0
 fi
 
 #DEBHELPER#
 
 # Also handle the initial installation
-if [ -d $IMMODULES_DIR ]; then
-     /@LIBDIR@/@SHARED_PKG@/gtk4-query-immodules --update-cache || true
-fi
-
+update_modules